﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using GMap.NET.WindowsPresentation;

namespace ImmovablesManager
{
    /// <summary>
    /// Interaction logic for CustomMarker.xaml
    /// </summary>
    public partial class CustomMarker : UserControl
    {
        public CustomMarker()
        {
            InitializeComponent();
        }

        private Popup _popup;
        private Label _label;

        public CustomMarker(string title)
        {
            this.InitializeComponent();


            _popup = new Popup();
            _label = new Label();


            _popup.Placement = PlacementMode.Mouse;
            {
                _label.Background = Brushes.AliceBlue;
                _label.Foreground = Brushes.Green;
                _label.BorderBrush = Brushes.WhiteSmoke;
                _label.BorderThickness = new Thickness(2);
                _label.Padding = new Thickness(5);
                _label.FontSize = 18;
                _label.Content = title;
            }
            _popup.Child = _label;
        }

      private void icon_MouseDown(object sender, MouseButtonEventArgs e)
      {
          _popup.IsOpen = !_popup.IsOpen;
      }

  }
}
